<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@page import="db.*,java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Specialization Analytics</title>
</head>
<body>
	<%
		Statement stmt = DBUtil.createStatement();
		ResultSet rs = stmt
				.executeQuery("SELECT COUNT(a.id), s.name, s.id FROM Applicant a, "
						+ "Specializations s WHERE a.specID = s.id GROUP BY a.specID");
		out.println("<table>");
		while (rs.next()) {
			out.println("<tr>");
			out.println("<td>" + rs.getString(2) + "</td>");
			out.println("<td><a href=\"applications.jsp?spec="
					+ rs.getInt(3) + "\">" + rs.getInt(1) + "</a></td>");
			out.println("</tr>");
		}
		out.println("</table>");
	%>
</body>
</html>